﻿using System.Collections.Generic;
using System.Text;

namespace Utility3D.Extensions
{
    public static class StringExtensions
    {
        public static string SeparateBy(this IEnumerable<string> source, string separator)
        {
            var sb = new StringBuilder();
            foreach (var s in source)
            {
                if (sb.Length != 0) sb.Append(separator);
                sb.Append(s);
            }
            return sb.ToString();
        }
    }
}